package com.dongzili.demo.common.vo;

import lombok.Getter;

/**
 * 状态码枚举类型
 */
@Getter
public enum ResponseCode {

    SUCCESS(200,"操作成功!", "Success"),
    FAILURE(201,"操作失败", "Failure"),

    USER_NOT_LOGIN(401, "未登录", "Failure"),
    /**系统相关的错误码：5开头**/
    ERROR(500,"系统异常，请稍后重试", "Failure"),
    /**参数相关的错误码：1开头**/
    PARAM_ERROR(1000,"参数异常", "Failure"),

    /**权限相关的错误码：2开头**/
    INVALID_TOKEN(2001,"未登录或登录信息已过期，请重新登录！", "Failure"),
    ACCESS_DENIED(2002,"授权已到期或无权访问，请联系管理员", "Failure"),
    USERNAME_OR_PASSWORD_ERROR(2003,"用户名或密码错误", "Failure"),
    ACCESS_DENIED_Copyright(2004,"该资源未授权，请联系管理员", "Failure"),
    Visitors_NotAllowed(2005,"游客身份受限,请去登录...", "Failure"),
    LOGIN_5ERROR_LIMIT(2006,"登录失败次数超过5次限制，请10分钟后再尝试..." , "Failure"),
    LOGIN_4ERROR_LIMIT(2007,"登录失败已达4次，如果再次登陆失败该账号将被锁定10分钟，是否继续？" , "Failure"),
    USER_DISALLOWED(2008, "该账号已禁用", "Failure"),

    MULTI_AGENCY_WARN(3001,"当前IP有多个机构IP段匹配", "Failure"),
    NONE_AGENCY_WARN(3002,"当前IP不在任何机构IP段内", "Failure"),
    AGENCY_NOT_FOUND(3002,"机构不存在", "Failure"),
    PCATEGORY_STATUS_BAN(3004,"父分类被禁用，无法新增子分类", "Failure"),
    CATEGORY_START_GROUP_EXIST(3005,"当前等级已存在正在使用的分类组，无法新增", "Failure"),
    NOT_PERMISSION(3006,"无权限操作", "Failure"),
    CATEGORY_GROUP_START_REPEAT(3007,"当前级别已有分类组在使用", "Failure"),
    DELETE_FAIL(3008,"删除失败", "Failure"),
    UPLOAD_FAIL(3009,"上传失败", "Failure"),

    NO_RECORD(3010, "未找到数据", "Failure"),
    ACCOUNT_REQUIRE(3011, "账号不能为空", "Failure"),
    PHONE_OR_MAIL_ERROR(3012, "手机号或邮箱错误", "Failure"),
    ACCOUNT_NOT_REGISTERED(3013, "该账号还没有注册", "Failure"),
    ACCOUNT_LOCKED(3014, "当前用户已被锁定，请联系管理员!", "Failure"),
    ACCOUNT_ADJUST_REQUIRE(3015, "当前用户还未被审核，请联系管理员!", "Failure"),

    LIMIT_ERROR(4000,"服务器繁忙，请稍后重试...", "Failure");

    private final Integer code;

    private final String message;

    private final String status;

//    ResponseCode(int code, String message){
//        this.code = code;
//        this.message = message;
//    }
    ResponseCode(Integer code, String message, String status){
        this.code = code;
        this.message = message;
        this.status = status;
    }

}
